<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>表单绑定-多选列表框select</title>
  <script type="text/javascript" src="vue.js"></script>
</head>
<body>
    <div id="app">
        <span>请选择语言，已选择 {{ selected.length }} 种</span>
        <br/>
        <select multiple v-model="selected">
            <option v-for="option in languages" v-bind:value="option.value">
                {{option.text}}
            </option>
        </select>
    </div>
    <script>
        let vm = new Vue({
            el:"#app",
            data:{
                selected:[],
                languages:[
                    {text: 'Python',     value: 101},
                    {text: 'JavaScript', value: 102},
                    {text: 'Pascal',     value: 103}
                ]
            }
        })
    </script>
</body>
</html>